package com.vodone.v1pin.detail.service
{
	import com.vodone.v1pin.ServiceProvider;
	import com.vodone.v1pin.core.service.HttpJsonDelegate;
	import com.vodone.v1pin.core.utils.GoodsUtil;
	import com.vodone.v1pin.detail.vo.ProductDetailVO;
	import com.vodone.v1pin.productlist.vo.QueryItemVO;
	
	import flash.utils.setTimeout;
	
	import mx.collections.ArrayCollection;
	import mx.rpc.http.mxml.HTTPService;

	public class ProductDelegate
	{
		public function ProductDelegate()
		{
		}
		
		public static function addDaohuo( uid:String , itemid:String , phone:String , email:String , memo:String , 
										  resultHandler:Function , faultHandler:Function ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().addDaohuoService;
			var params:Object = {
				userid: uid,
				itemid: itemid, 
				phone: phone,
				useremail: email,
				meno:memo
			};
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler );
		}
		
		public static function getProductDetail( id:String , resultHandler:Function ,  faultHandler:Function = null):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getProductDetailService;
			var params:Object = {
				id : id
			}
			
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler );
		}
	}
}